// ==================================================================================================
// Copyright(C) 2007 FI Ltd. All rights reserved.
//
// SYSTEM NAME	: FI.Net Application Framework
// COMPONENT ID	: FI.Common
// COMPONENT DESC:		
//
// CREATED DATE/BY:		18 Aug 2018 / Tian Mi
//
// REVISION HISTORY:	DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;

namespace FI.Core
{
    /// <summary>
    /// An exception that is similar with System.Data.DBConcurrencyException.
    /// </summary>
    [Serializable]
    public class ConcurrentException : Exception
    {
        /// <summary>
        /// Initializes with defaults.
        /// </summary>
        public ConcurrentException()
        {
        }

        /// <summary>
        /// Initializes with a specified error message.
        /// </summary>
        /// <param name="message">A message that describes the error.</param>
        public ConcurrentException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes with a specified error 
        /// message and a reference to the inner exception that is the cause of this exception.
        /// </summary>
        /// <param name="message">The error message that explains the reason for the exception.
        /// </param>
        /// <param name="innerException">
        /// <para>The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</para>
        /// </param>
        public ConcurrentException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes with serialized data.
        /// </summary>
        /// <param name="info">The object that holds the serialized object data.</param>
        /// <param name="context">The contextual information about the source or destination.
        /// </param>
        protected ConcurrentException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}